package com.mew.lobby.provide;

import com.mew.common.rest.events.GetOnlineGiftMessage;
import com.mew.common.rest.events.OnlineGiftMessage;
import com.mew.common.rest.events.SignInfoResponseMessage;
import com.mew.common.rest.events.SignResponseMessage;
import com.mew.common.rest.user.UserMoneyResponseMessage;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;


@Component
@FeignClient(value = "mew-kernel-user")
public interface EventsFeignService {

    @GetMapping(value = "/onlinegift/refresh")
    @ResponseBody
    OnlineGiftMessage refresh(@RequestParam("userId") long userId);

    @PostMapping(value = "/onlinegift/get")
    @ResponseBody
    GetOnlineGiftMessage get(@RequestParam("type") int type, @RequestParam("uid")long uid);

    @PostMapping(value = "/sign/signandinfo")
    @ResponseBody
    SignInfoResponseMessage signandinfo(@RequestParam("uid")long uid);

    @PostMapping(value = "/sign/gain")
    @ResponseBody
    SignResponseMessage gain(@RequestParam("uid") long uid, @RequestParam("gtype") int gtype);
}
